//
//  ACEStarView.m
//  ACE
//
//  Created by zhangtao on 2018/8/10.
//  Copyright © 2018年 zt.td. All rights reserved.
//

#import "ACEStarView.h"

@implementation ACEStarView
-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        
        
    }
    return self;
}

-(void)setStarNum:(NSInteger)starNum{
    CGFloat W = self.frame.size.height;
    CGFloat space = (self.frame.size.width-W*5)/4;
    
    for (int i = 0; i<5; i++) {
        UIImageView *imageV = [[UIImageView alloc]initWithFrame:CGRectMake((W+space)*i, 0, W, W)];
        if (i<starNum) {
            imageV.image = [UIImage imageNamed:@"Group6"];
        }else{
            imageV.image = [UIImage imageNamed:@"星星 灰色"];
        }
        [self addSubview:imageV];
    }
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
